package com.yh.csx.event.rpc;

import com.google.common.eventbus.EventBus;
import com.yh.csx.event.client.event.EventBusUtils;
import com.yh.csx.event.store.config.EventAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author zhangsheng
 * @date 2021/8/24 15:14
 */
@Import(EventAutoConfiguration.class)
@EnableSwagger2
@EnableEurekaClient
@EntityScan("com.yh.csx.event.store.gateway")
@EnableJpaRepositories(basePackages = "com.yh.csx.event.store.gateway")
@SpringBootApplication(scanBasePackages = "com.yh.csx.event")
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableTransactionManagement(proxyTargetClass = true)
public class EventRpc {

    public static void main(String[] args) {
        SpringApplication.run(EventRpc.class, args);
    }
}
